home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / recent1 / wwwcount2.3bin.lha / AMIGA INSTALL next >
Text File  |  1997-05-19  |  10KB  |  304 lines

  1.              WWWCOUNTER 2.3 (C) 1996 by Muhammad A. Muquit 
  2.                  Ported for the Amiga by Bert Vortman.
  3.                      **** BINARY DISTRIBUTION ****
  4.  
  5. Copyright:
  6.  
  7. Copyright 1995-1996 by Muhammad A Muquit. Permission to use, copy, modify
  8. and sell this program for any purpose is hereby granted without fee,
  9. provided that this copyright notice appear in all copies and that both that
  10. copyright notice and this permission notice appear in supporting
  11. documentation.  If the program is included in a book, publication or in a
  12. software distribution media for sale, the author must be notified about it.
  13. No binary only distribution is allowed. All distributions must include the
  14. source and this copyright notice.
  15.  
  16. THIS PROGRAM IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
  17. THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE
  19. AUTHOR Muhammad A. Muquit BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20. CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  21. DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  22. TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  23. PERFORMANCE OF THIS SOFTWARE.
  24.  
  25. For questions about the program, mail to:
  26.  
  27. ma_muquit@fccc.edu
  28.  
  29. For questions about the Amiga Port:
  30.  
  31. albertv@spinnewiel.xs4all.nl
  32.  
  33.  
  34. REQUIREMENTS
  35. ------------
  36.  
  37. - Ixemul.library v46 from http://www.ninemoons.com if you run AWS
  38.  
  39.   If you run Apache, do nothing, you must have the correct version of
  40.   ixemul already. 
  41.  
  42. - Fileutils-3.15.lha from http://www.ninemoons.com
  43.  
  44. - Static IP address. It is impossible to use it with a dynamic connection.
  45.  
  46. - Apache httpd       from www.dsdelft.nl/~apache
  47.  
  48.   or
  49.   
  50.   AWS httpd          from www.omnipresence.com/AWS
  51.  
  52.  
  53.  
  54. STEPS TO INSTALL THE BINARY DISTRIBUTION
  55. ----------------------------------------
  56.  
  57. Installation is easy but you have to take care of some permissions even if
  58. you don't run multiuser. In my experience it is not always necessary to
  59. chance permissions. But sometimes files do need a change of ownership/permissions, 
  60. sometimes not. So, I've decided to do it all the time, it gives less problems.
  61. But feel free to experiment and see if it is necessary or not. It's
  62. maybe handy to download the fileutils-3.15.lha from  www.ninemoons.com. 
  63. You can find a chown and chmod program to set the permissions for your files. 
  64.  
  65.  
  66. STEP 1
  67. ------
  68.  
  69. Running Apache:
  70. ---------------
  71.  
  72. If you are running apache, do nothing. Just make sure that you run 
  73. the wwwcounter as the user/group which runs the httpd. Make sure
  74. that all files after installing run under this user/group 
  75. (especially in the data directory)
  76.  
  77.  
  78. Running AWS:
  79. ------------
  80.  
  81. Add a user & group to Miami or Amitcp, something like: 
  82.  
  83.     user : httpuser
  84.     group: daemon
  85.  
  86. Make sure that you have installed the fileutils-3.15-bin.lha
  87. from www.ninemoons.com. You need especially the chmod and
  88. chown program. It is strange for Amiga users to use these
  89. chmod and chown programs but it is necessary, otherwise the 
  90. wwwcounter won't run. Make also sure that all
  91. files (after compilation & installing) have the same
  92. owner & group ownership as the ones you just added to the 
  93. users of your server. 
  94.  
  95.  
  96. STEP 2
  97. ------
  98.  
  99. * First of all you need an assign to the Apache directory.
  100.   So add this to your user-startup:
  101.  
  102. assign APACHE: <your path to the apache directory>
  103.  
  104.     (If you run AWS, you still have to assign APACHE: to your
  105.     AWS directory) 
  106.  
  107. STEP 3
  108. ------
  109.  
  110. * Unpack the wwwcounter2.3-bin.lha archive to the apache: directory:
  111.  
  112. lha x -x -m -a wwwcounter2.3-bin.lha APACHE:
  113.  
  114.  
  115. STEP 4
  116. ------
  117.  
  118. * Enter your cgi-bin directory, You should find a Count.cgi program there.
  119.  
  120. * do a chown <user that runs httpd>:<group that runs httpd> Count.cgi
  121. * do a chmod 755 Count.cgi
  122.  
  123. STEP 5
  124. ------
  125.  
  126. * Enter the Counter/conf directory, you should find a file Count.cfg:
  127.   So startup your texteditor and change it:
  128.  
  129.   (If you have sh installed, then you can use the Gen-Conf program. You can
  130.   find the resulting count.cfg file in the same directory as the Gen-Conf
  131.   program)
  132.  
  133.  
  134.     #######    
  135.     # configuratin file for Count 2.3
  136.     # Automatically generated from user input by the script Gen-conf
  137.     # Created on: Fri May 16 13:17:41 GMT 1997
  138.     # Edit by hand, if you need to add something
  139.     ##############################################
  140.     ####
  141.     # BLOCK 1
  142.     # Allow automatic datafile creation or not
  143.     # it's a required block. 1 means allow, 0 means do not allow.
  144.     ####
  145.     {
  146.     0
  147.     }
  148.  
  149.   Allow automatic datafile creation means that everyone who wants to use
  150.   your counter from your server can do that. A data file in the Counter/data
  151.   directory is automatically created if it does not exist.  It means also a 
  152.   great deal of hits to your site when it becomes known to the public that
  153.   you have such a free counter :). Allowing users to create a datafile is very
  154.   convenient, as you do not have to be asked all the time when someone decides 
  155.   to use the counter. So, it's wise not to allow it and keep this at zero.
  156.   But the decision is yours.
  157.  
  158.  
  159.     ###
  160.     # BLOCK 2
  161.     # run the program in strict mode or not.
  162.     # it's a required block. 1 means strict, 0 means not strict.
  163.     ###
  164.     {
  165.     0
  166.     }
  167.  
  168.   Now you need to decide if you want to use the program in strict   
  169.   mode. If you use the program in strict mode, the browsers which
  170.   do not return the environment variable HTTP_REFERER, will not be
  171.   served, that is no access hit will be recorded, no time or date
  172.   will be displayed. Instead, a string 888888 will be displayed. 
  173.     
  174.   The strict mode ensures that your counter data file can not be messed
  175.   up by accessing the counter remotely from a browser which does not return
  176.   that variable. Note, good browsers like netscape returns this
  177.   variable. Other browsers e.g. Mosaic does not return this variable 
  178.   in IMG GET method at this time.  This strict mode is experimental at 
  179.   this time! (so it's wise to leave it zero, but experiment).
  180.  
  181.  
  182.     ####
  183.     # BLOCK 3
  184.     # Allow to use RGB color database. 0 means allow, 1 means don't
  185.         # allow.convenient to use because colorname e.g., red, gold etc
  186.     # can be used instead of rgb components of the color, however it's
  187.     # very inefficient to lookup.
  188.     ####
  189.     {
  190.     1
  191.     }
  192.  
  193.   Ok, do you want the users to use the file rgb.txt for color name
  194.   lookup? It is very inefficient to search this file every time the
  195.   web page is loaded. If you answer yes, the color name
  196.   will be looked up and used. If you answer no, the color will be
  197.   looked up but instead of the counter image, the RGB value will
  198.   be displayed and the user will be asked to use the RGB value
  199.   instead. This will prevent users to use this file. However,
  200.   the convenience of allowing to use rgb.txt file is that color name e.g,
  201.   red, gold etc.  can be used instead of cryptic red, green and blue
  202.   components of the color.
  203.  
  204.  
  205.     ####
  206.     # BLOCK 4
  207.     # Ignore count block, you might want to ignore the local sites.
  208.     # If you do not want to ignore any hosts from
  209.     # counting, just put { on one line and } on the next line but make sure
  210.     # the braces exist!
  211.     # It's a required block.
  212.     ######
  213.     # netmasks can be used to ignore a entire network or a specific
  214.     # range of hosts in the network. Read the counter documentation to
  215.     # know about netmasks.
  216.     {
  217.     }
  218.  
  219.   Any number of hosts can be ignored from counting. A netmask can be used 
  220.   to filter out a specific range of host in a network or to filter out 
  221.   the entire network. READ the Count.html file BEFORE changing this 
  222.   variabele! 
  223.  
  224.     ####
  225.     # BLOCK 5
  226.     # Auth block
  227.     # All possible names and IP addresses by which your host can be referred.
  228.     # These hosts can access the counter remotely or locally. Host running
  229.     # the http server must exist here.
  230.     ##
  231.     {
  232.     myhost.xs4all.nl
  233.     myhost
  234.     0.0.0.0
  235.     }
  236.  
  237.   Here you MUST enter your own domain name and IP address at the appropiate place.
  238.  
  239.  
  240. * do a chown <user that runs httpd>:<group that runs httpd> count.cfg
  241. * do a chmod 664 count.cfg
  242.  
  243.  
  244. STEP 6
  245. ------
  246.  
  247. * do a chown <user that runs httpd>:<group that runs httpd> [filename] for all 
  248.   files in the remaining directories of the Counter directory.
  249.  
  250. * do a chmod 644 for all files in the digit directory
  251. * do a chmod 664 [filename] for all files in the remaining directories of the
  252.   Counter directory. You have to do this also when you add a datafile to
  253.   the data directory.
  254.  
  255. STEP 7
  256. ------
  257.  
  258. Test the program from your browser. So, copy the countexample.html file in
  259. the public directory to a place where you want it, startup Apache or AWS,
  260. start your browser and type:
  261.  
  262. http:///countexample.html (or where ever you put it)
  263.  
  264. This is how it looks like:
  265.  
  266. <img src="/cgi-bin/Count.cgi?df=sample.dat" align=absmiddle> 
  267. A counter example 
  268. <img src="/cgi-bin/Count.cgi?display=clock" align=absmiddle>
  269.  
  270.  
  271. The string between ? and " is called the QUERY_STRING. Make sure there is
  272. no newlines in the img src= line and no space in the QUERY_STRING. 
  273. Here in, df=sample.dat, df means datafile and sample.dat is the counter 
  274. datafile. The counter stores the hits in this file. This datafile is supplied. 
  275. If you configured the counter to allow automatic datafile creation (look at
  276. count.cfg file), you can specify a datafile with df like
  277. df=count.dat. The file count.dat will be created for you if the 
  278. permission to the data directory is correct. 
  279.  
  280.  
  281. If you configured not to allow automatic datafile creation (good thing), 
  282. you have to create this file in the data directory.
  283. Start your texteditor, type: 0 and save it as:
  284.  
  285. count.dat
  286.  
  287. in the data directory. And chown to the user & group of the wwwcounter. ie: 
  288.  
  289.        chown user:group count.dat
  290.        chmod 664 count.dat
  291.  
  292. The counter program has lots of options, you can make it work and look the
  293. way you desire. In the query string, you can use the options as described
  294. in the docs/Count.html file.
  295.  
  296. If you have any questions about compiling the wwwcounter mail to:
  297.  
  298. albertv@spinnewiel.xs4all.nl
  299.  
  300. All options of the Unix version are available in the Amiga version.
  301.  
  302. happy html'ing,
  303.  
  304. Bert Vortman